<template>
    <div class="box">
        <div class="block">
            <el-pagination @size-change="handleSizeChange"
             @current-change="handleCurrentChange"
                :current-page="page" 
                :page-sizes="pageSizes"
                :page-size="pageSize"
                layout="total, sizes, prev, pager, next, jumper" :total="total">
            </el-pagination>
        </div>
    </div>
</template>

<script>
export default {
    // props:['page','pageSize','total','pageSizes'],
    props:{
        page:{
            default(){return 1},
            type:Number
        },
        pageSize:{
            default(){return 10},
            type:Number
        },
        total:{
            default(){return 0},
            type:Number
        },
        pageSizes:{
            default(){return [10,20.40,60,80,100]},
            type:Array()
        }

    },
    methods: {
        handleSizeChange(val) {
            console.log(`每页 ${val} 条`);
            this.$emit('chengepageSize',val)
        },
        handleCurrentChange(val) {
            console.log(`当前页: ${val}`);
            this.$emit('chengepage',val)
        }
    },
    data() {
        return {
            
            currentPage4: 1
        };
    }

}
</script>

<style >
.block {
    display: flex;
    align-self: flex-end
}
</style>